Skip to content

Upgrade erusev/parsedown from 1.7.4 to 1.8.0#704

Merged
mikelittle merged 1 commit intomasterfrom
20260227-update-parsedown-library
Feb 28, 2026
Merged

Upgrade erusev/parsedown from 1.7.4 to 1.8.0#704
mikelittle merged 1 commit intomasterfrom
20260227-update-parsedown-library

Conversation

@mikelittle
Copy link
Contributor

@mikelittle mikelittle commented Feb 27, 2026

Summary

Apropros this Dependabot PR which was closed, because this is master and there are security fixes, I looked into it.

  • Upgrade erusev/parsedown from ~1.7.4 to ~1.8.0, the first stable release in 6+ years, which includes security fixes (catastrophic backtracking prevention) and improved CommonMark compliance
  • Update MarkdownParser::blockHeader() to use the 1.8.0 element structure where handler is now an array with function/argument/destination keys, and child elements use the elements key directly
  • Fixes a pre-existing bug where header anchor IDs were empty (href="#" id="") because sanitize_title_with_dashes() was processing raw Parsedown inline tokens instead of plain text — 1.8.0's handler['argument'] provides clean text, so anchors now render correctly

Test plan

  • Verify documentation pages render correctly in the admin (Welcome, Getting Started, Linking pages)
  • Verify header anchor links contain correct IDs and are clickable
  • Verify relative links and cross-module links resolve correctly
  • Verify images with relative paths display correctly
  • Verify code blocks render with syntax highlighting
  • Check PHP error logs for any warnings or errors from the parser

🤖 Generated with Claude Code

Update the parsedown dependency to the latest stable release (1.8.0)
which includes security fixes and improved CommonMark compliance.

Update MarkdownParser::blockHeader() to use the 1.8.0 element structure
where handler is now an array with function/argument/destination keys,
and child elements use the 'elements' key directly. This also fixes a
pre-existing bug where header anchor IDs were empty because
sanitize_title_with_dashes() was processing raw Parsedown inline tokens
instead of plain text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mikelittle
Copy link
Contributor Author

Some before and after images
before:
getting-started
linking
welcome

after:

getting-started linking welcome

@mikelittle mikelittle merged commit b812d3c into master Feb 28, 2026
1 of 2 checks passed
@mikelittle mikelittle deleted the 20260227-update-parsedown-library branch February 28, 2026 14:42
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Successfully created backport PR for v26-branch:

@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Backport failed for v12-branch, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin v12-branch
git worktree add -d .worktree/backport-704-to-v12-branch origin/v12-branch
cd .worktree/backport-704-to-v12-branch
git switch --create backport-704-to-v12-branch
git cherry-pick -x f698bcbdd7ae0c6f0b7fc500657d6ca3144a7e3f

@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Successfully created backport PR for v23-branch:

@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Successfully created backport PR for v24-branch:

@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Successfully created backport PR for v25-branch:

@github-actions
Copy link

github-actions bot commented Mar 2, 2026

After resolving conflicts, continue with:

# Add the resolved files
git add .
# Continue the cherry-pick
git cherry-pick --continue
# Push the branch to GitHub
git push --set-upstream origin backport-704-to-v12-branch
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktree/backport-704-to-v12-branch

Then create a pull request using the GitHub CLI:

gh pr create --base v12-branch --head backport-704-to-v12-branch --title "[Backport v12-branch] Upgrade erusev/parsedown from 1.7.4 to 1.8.0" --body "Backport of #704 to \`v12-branch\`."

@humanmade humanmade deleted a comment from github-actions bot Mar 2, 2026
@humanmade humanmade deleted a comment from github-actions bot Mar 2, 2026
@humanmade humanmade deleted a comment from github-actions bot Mar 2, 2026
@humanmade humanmade deleted a comment from github-actions bot Mar 2, 2026
@humanmade humanmade deleted a comment from github-actions bot Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants